//while
sleeps = true

pipeline{
  agent any
  stages{
    stage("run"){
      steps{
        script {
          while(sleeps){
            println "I'm sleeping..."
            sleep 10
          }
        }
      }
    }
  }
}